package com.ler.yrmall.product.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ler.yrmall.config.LongToStringSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author Leron
 * @version 1.0
 */
@Data
public class SkuItemSaleAttrVO implements Serializable {

    /**
     * attrId
     */
    private Long attrId;

    /**
     * 属性名称
     */
    private String attrName;

    private List<AttrValueWithSkuIds> attrValueWithSkuIds;

    @Data
    public static class AttrValueWithSkuIds implements Serializable {

        /**
         * 属性值
         */
        private String attrValue;

        /**
         * 拥有此属性值的sku列表
         */
        @JsonSerialize(using = LongToStringSerialize.class)
        private List<Long> skuIds;

    }
}
